<template>
  <div class="info">
    <Title title="百万用户选择" ></Title>
    <div class="infoRow2" @click.once="test">
      <div class="row2">
        <p>{{this.user}}万人</p>
        <span>累计用户数</span>
      </div>
      <Line1></Line1>
      <div class="row2">
        <p>{{this.money}}亿元</p>
        <span>累计交易额</span>
      </div>
      <Line1></Line1>
      <div class="row2">
        <p>{{this.allmoney}}万元</p>
        <span>累计为用户赚取</span>
      </div>
    </div>
    <div v-transfer-dom>
      <loading :show="show1"></loading>
    </div>
  </div>
</template>
<script>
import Title from '../../../component/common/Title'
import Line1 from '../../../component/common/Line'
import {getMsg} from '../../../../service/getData'
import { Loading,TransferDomDirective as TransferDom} from 'vux'
import { clearTimeout } from 'timers';
let time = null
export default {
  components:{
    Title,
    Line1,
    Loading
  },
  data(){
    return {
      user:73,
      money:18.7,
      allmoney:2431,
      show1:false
    }
  },
  methods:{
    test(){//TODO:删除
      this.show1 = true
      time = setTimeout(() => {
        this.show1 =false
      }, 2000)
    }
  },
  directives: {
    TransferDom
  },
  beforeDestroy(){
    clearTimeout(time)
  }
}
</script>
<style lang="less" scoped>
  .info{
    width: 100%;
    height: 2.4rem;
    display: flex;
    margin-top: .3rem;
    flex-direction: column;
    background-color: #fff;
    .infoRow2{
      flex:2;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-around;
      width:90%;
      margin: 0 auto;
      .row2{
        flex:1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }
      .row2 span:first-child{
        font-size: 0.42rem
      }
      .row2 span:last-child{
        font-size: .34rem;
        color:#b2b2b2;
      }
    }
  }
</style>
